System, method, and apparatus for determining presentation time for picture without presentation time stamp

ABSTRACT

Presented herein are system(s), method(s), and apparatus for determining the presentation time for a picture without a presentation time stamp. A first and second picture are decoded. The first picture is a reference picture for the second picture. The presentation time for the second pictures is computed as a function of a presentation time and a decode time for the first picture.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims priority to and the benefit of U.S. patent application Ser. No. 11/024,561, filed Dec. 22, 2004, which is a continuation-in-part of and claims priority to and the benefit of U.S. patent application Ser. No. 10/340,061, filed Jan. 9, 2003, and issued as U.S. Pat. No. 7,787,539 on Aug. 31, 2010, the contents of which are hereby incorporated herein by reference in their entirety for all purposes.

FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

[Not Applicable]

MICROFICHE/COPYRIGHT REFERENCE

[Not Applicable]

BACKGROUND OF THE DISCLOSURE

In MPEG-2 video, a B-picture can be encoded by one picture displayed before, called the forward reference picture and one picture displayed after, called the backward reference picture. Encoded B-pictures are data dependent on these reference pictures. The reference pictures are decoded prior to the B-picture. One of the reference pictures, however is displayed after the B-picture.

As a result, the decoding order and the displaying order can be different. The decoder system receives the pictures in the decoding order. After decoding the pictures, the decoder system reorders the pictures into the display order. A display engine displays the reordered pictures.

A multimedia program can include a video, multiple audio channels, and data channels. The video, audio channels, and data channels are synchronized to make the program intelligible. Time stamps are used to achieve this synchronization.

As noted above, the video pictures have a decoding order and a display time. Decoding time stamps (DTS) indicate the decoding time. Presentation time stamps (PTS) indicate the display order. The video encoder encodes the DTS and PTS into the video program. The DTS and PTS are 33-bit numbers that are driven by a 27 MHz clock.

The DTS and PTS add overhead to the transmitted stream. Encoders encode the time stamps on a periodic basis. MPEG allows as much as 700 ms between time stamps. For a display rate of 30 interlaced pictures/sec (60 fields/sec.), there can be as many as 41 consecutive fields without time stamps.

A decoder system can interpolate the DTS and PTS values of the pictures without time stamps. The decoding and presentation times are spaced evenly apart. The decoder system can interpolate the decode time because the pictures are provided in decode order. The decoder system interpolates the presentation time by evaluating the type of pictures. However, interpolating the PTS values involves decoding numerous parameters and pictures. This can be unfeasible where a large number of consecutive pictures are without time stamps. This is particular complex in cases where there are a large number of consecutive B-pictures.

Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of ordinary skill in the art through comparison of such systems with the present invention as set forth in the remainder of the present application with reference to the drawings.

BRIEF SUMMARY OF THE INVENTION

Presented herein are system(s), method(s), and apparatus for determining the presentation time for a picture without a presentation time stamp.

In one embodiment, there is presented a method for determining a presentation time for pictures. The method comprises decoding a first picture; decoding a second picture, the first picture being a reference picture for the second picture; and computing a presentation time for the second picture, based on a presentation time and a decode time for the first picture.

In another embodiment, there is presented a circuit for determining a presentation time for pictures. The circuit comprises a processor and a memory connected to the processor. The memory stores a plurality of executable instructions. The execution of the instructions by the processor causes: decoding a first picture; decoding a second picture, wherein the first picture is a reference picture for the second picture; and computing a presentation time for the second picture, based on a presentation time and a decode time for the first picture.

In another embodiment, there is presented a system for determining presentation times for pictures. The system comprises a video decoder, a frame buffer, and a buffer descriptor structure. The video decoder decodes a first picture and a second picture, the first picture being a reference picture for the second picture. The frame buffer stores the first picture. The buffer descriptor structure stores a presentation time and a decode time for the first picture. The video decoder computes a presentation time for the second picture, based on a presentation time and a decode time for the first picture.

These and other features and advantages of the present invention may be appreciated from a review of the following detailed description of the present invention, along with the accompanying figures in which like reference numerals refer to like parts throughout.

BRIEF DESCRIPTION OF SEVERAL VIEWS OF THE DRAWINGS

FIG. 1a illustrates a block diagram of an exemplary Moving Picture Experts Group (MPEG) encoding process, in accordance with an embodiment of the present invention.

FIG. 1b illustrates an exemplary interlaced picture, in accordance with an embodiment of the present invention.

FIG. 1c illustrates an exemplary sequence of pictures in display order.

FIG. 1d illustrates an exemplary sequence of pictures in decoding order.

FIG. 2 illustrates a block diagram of an exemplary circuit for decoding the compressed video data, in accordance with an embodiment of the present invention.

FIG. 3 is a timing diagram describing the presentation time and decoding times for exemplary pictures.

FIG. 4 is a flow diagram for determining a presentation time for a picture, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1a illustrates a block diagram of an exemplary Moving Picture Experts Group (MPEG) encoding process of video data 101, in accordance with an embodiment of the present invention. The video data 101 comprises a series of pictures 103. Each picture 103 comprises two-dimensional grids of luminance Y, 105, chrominance red C_(r), 107, and chrominance blue C_(b), 109, pixels.

FIG. 1b is an illustration of a picture 103. A picture 103 can either be captured as an interlaced picture or as a progressive picture. In an interlaced picture 103, the even-numbered lines are captured during one time interval, while the odd-numbered lines are captured during an adjacent time interval. The even-numbered lines form the top field, while the odd-numbered lines form the bottom field of the interlaced picture.

Similarly, a display device can display a picture in progressive format or in interlaced format. A progressive display displays the lines of a picture sequentially, while an interlaced display displays one field followed by the other field. In a special case, a progressive picture can be displayed on an interlaced display by displaying the even-numbered lines of the progressive picture followed by the odd-numbered lines, or vice versa.

Referring again to FIG. 1a , the two-dimensional grids are divided into 8×8 blocks, where a group of four blocks or a 16×16 block 113 of luminance pixels Y is associated with a block 115 of chrominance red C_(r), and a block 117 of chrominance blue C_(b) pixels. The block 113 of luminance pixels Y, along with its corresponding block 115 of chrominance red pixels C_(r), and block 117 of chrominance blue pixels C_(b) form a data structure known as a macroblock 111. The macroblock 111 also includes additional parameters, including motion vectors, explained hereinafter. Each macroblock 111 represents image data in a 16×16 block area of the image.

The data in the macroblocks 111 is compressed in accordance with algorithms that take advantage of temporal and spatial redundancies. For example, in a motion picture, neighboring pictures 103 usually have many similarities. Motion causes an increase in the differences between pictures, the difference being between corresponding pixels of the pictures, which necessitate utilizing large values for the transformation from one picture to another. The differences between the pictures may be reduced using motion compensation, such that the transformation from picture to picture is minimized. The idea of motion compensation is based on the fact that when an object moves across a screen, the object may appear in different positions in different pictures, but the object itself does not change substantially in appearance, in the sense that the pixels comprising the object have very close values, if not the same, regardless of their position within the picture. Measuring and recording the motion as a vector can reduce the picture differences. The vector can be used during decoding to shift a macroblock 111 of one picture to the appropriate part of another picture, thus creating movement of the object. Hence, instead of encoding the new value for each pixel, a block of pixels can be grouped, and the motion vector, which determines the position of that block of pixels in another picture, is encoded.

Accordingly, most of the macroblocks 111 are compared to portions of other pictures 103 (reference pictures). When an appropriate (most similar, i.e. containing the same object(s)) portion of a reference picture 103 is found, the differences between the portion of the reference picture 103 and the macroblock 111 are encoded. The location of the portion in the reference picture 103 is recorded as a motion vector. The encoded difference and the motion vector form part of the data structure encoding the macroblock 111. In the MPEG-2 standard, the macroblocks 111 from one picture 103 (a predicted picture) are limited to prediction from portions of no more than two reference pictures 103. It is noted that pictures 103 used as a reference pictures for a predicted picture 103 can be a predicted picture 103 from other reference pictures 103.

The macroblocks 111 representing a picture are grouped into different slice groups 119. The slice group 119 includes the macroblocks 111, as well as additional parameters describing the slice group. Each of the slice groups 119 forming the picture form the data portion of a picture structure 103. The picture 103 includes the slice groups 119 as well as additional parameters that further define the picture 103.

The picture 103 also includes a header 103 h storing various parameters that relate to the picture. The parameters may include, for example, a picture structure indicator (picture/top-field/bottom-field), a progressive picture sequence flag (usually comes in transport layer), a progressive picture flag, and a repeat first field parameter. It is noted that in varying standards there may be additional or less parameters.

The progressive picture parameter indicates whether the picture has been encoded as a progressive picture. If the bit is set, the picture has been encoded as a progressive picture. If the bit is not set, the picture has been encoded as an interlaced picture.

The picture structure parameter specifies the picture structure corresponding to the image buffer. Pan scan vectors specify the displayable part of the picture. The aspect ratio indicates the aspect ratio of the image buffer. The decode and display horizontal size parameters indicate the decoded and the displayable horizontal sizes of the image buffer, respectively.

The repeat first field is a one-bit parameter that specifies whether the first displayed field of the picture is to be redisplayed after the second field, for an interlaced sequence. The repeat first field is used to display motion picture standard material on a National Television Standard Committee (NTSC) display. The motion picture standard material includes 24 progressive pictures per second. The national television standard displays 60 fields per second. To display the motion picture standard material on the NTSC display, a technique known as 3:2 pull down is used.

In 3:2 pulldown, the even numbered lines and odd-numbered lines form the top field and bottom field, respectively. Two pictures or four pictures from the motion picture standard material correspond to 2.5 picture periods or 5 field periods for the NTSC display. For every two progressive motion picture standard pictures, four fields are generated. One of the fields from the second picture is repeated. The repeat first field indicates whether the first field is repeated.

I₀, B₂, B₃, P₁, B₅, B₆, and P₄, FIG. 1c , are exemplary pictures. The arrows illustrate the temporal prediction dependence of each picture. For example, picture B₂ is dependent on reference pictures I₀, and P₁. Pictures coded using temporal redundancy with respect to exclusively earlier pictures of the video sequence are known as predicted pictures (or P-pictures), for example picture P₁ is coded using reference picture I₀. Pictures coded using temporal redundancy with respect to earlier and/or later pictures of the video sequence are known as bi-directional pictures (or B-pictures), for example, pictures B₂ is coded using pictures I₀ and P₁. Pictures not coded using temporal redundancy are known as I-pictures, for example I₀. In the MPEG-2 standard, I-pictures and P-pictures are also referred to as reference pictures.

The foregoing data dependency among the pictures requires decoding of certain pictures prior to others. Additionally, the use of later pictures as reference pictures for previous pictures requires that the later picture is decoded prior to the previous picture. As a result, the pictures cannot be decoded in temporal display order, i.e. the pictures may be decoded in a different order than the order in which they will be displayed on the screen. Accordingly, the pictures are transmitted in data dependent order, and the decoder reorders the pictures for presentation after decoding. I₀, P₁, B₂, B₃, P₄, B₅, B₆, FIG. 1 d, represent the pictures in data dependent and decoding order, different from the display order seen in FIG. 1 c.

Referring again to FIG. 1a , the pictures are then grouped together as a group of pictures (GOP) 123. The GOP 123 also includes additional parameters further describing the GOP. Groups of pictures 123 are then stored, forming what is known as a video elementary stream (VES) 125. The VES 125 is then packetized to form a packetized elementary sequence 130. The packetized elementary sequence 130 includes packets of varying length.

The packets 130 include a header 130 h storing a number of parameters. The parameters can include decode time stamps (DTS) and presentation time stamps (PTS). The DTS indicates the decoding order. The PTS indicates the display order. Encoders encode the time stamps into the PES headers on a periodic basis. MPEG allows as much as 700 ms between time stamps. For a display rate of 30 interlaced pictures/sec (60 fields/sec.), there can be as many as 41 consecutive fields without time stamps. Flags in the PES header 130 h indicate the presence of the PTS and DTS.

The packetized elementary sequence 130 is then packetized into uniform length packets 135. Each packet 135 is then associated with a transport header, forming what are known as transport packets. The transport packets 135 can be multiplexed with other transport packets 135 carrying other content, such as another video elementary stream 125 or an audio elementary stream. The multiplexed transport packets form what is known as a transport stream. The transport stream is transmitted over a communication medium for decoding and displaying.

FIG. 2 illustrates a block diagram of an exemplary circuit for decoding the compressed video data, in accordance with an embodiment of the present invention. Data is received and stored in a presentation buffer 201 within a Synchronous Dynamic Random Access Memory (SDRAM) 202. The data can be received from either a communication channel or from a local memory, such as, for example, a hard disc or a DVD.

The data output from the presentation buffer 201 is then passed to a data transport processor 205. The data transport processor 205 demultiplexes the transport stream into packetized elementary stream constituents, and passes the audio transport stream to an audio section 215 and the video transport stream to a video transport processor 207 and then to a compressed data buffer 208 for a video decoder 209. The audio data is then sent to the output blocks, and the video is sent to a display engine 211.

The display engine 211 scales the video picture, renders the graphics, and constructs the complete display. Once the display is ready to be presented, it is passed to a video encoder 216 where it is converted to analog video using a digital to analog converter (DAC) 217.

The video decoder 209 decodes at least one picture, I₀, B₁, B₂, P₃, B₄, B₅, P₆, . . . , during each picture display period, in the absence of Personal Video Recording (PVR) modes when live decoding is turned on. Due to the presence of the B-pictures, B₁, B₂, the video decoder 209 decodes the pictures, I₀, B₁, B₂, P₃, B₄, B₅, P₆, . . . , in an order that is different from the display order. The video decoder 209 decodes each of the reference pictures, e.g., I₀, P₃, prior to each picture that is predicted from the reference picture. For example, the video decoder 209 decodes I₀, B₁, B₂, P₃, in the order, I₀, P₃, B₁, and B₂. After decoding I₀ and P₃, the video decoder 209 applies the offsets and displacements stored in B₁ and B₂, to the decoded I₀ and P₃, to decode B₁ and B₂. In order to apply the offset contained in B₁ and B₂, to the decoded I₀ and P₃, the video decoder 209 stores decoded I₀ and P₃ in memory known as frame buffers 210. The display engine 211, then displays the decoded images onto a display device, e.g. monitor, television screen, etc., at the proper time and at the correct spatial and temporal resolution.

Since the images are not decoded in the same order in which they are displayed, the display engine 211 lags behind the video decoder 209 by a delay time. In some cases the delay time may be constant. Accordingly, the video decoder 209. writes the decoded images in frame buffers 210 so that the display, engine 211 can display them at the appropriate time. Additionally, the video decoder 209 writes parameters associated with the decoded pictures in buffer descriptor structures 212. These parameters include the Presentation Time Stamp (PTS), the Decode Time Stamp (DTS), repeat first field, and top field first parameters, to name a few.

The display engine 211 uses the PTS to determine when to display the decoded pictures. However, not every picture has a PTS. Where a pictures does not have a PTS, the video decoder 209 calculates the presentation time and writes the presentation time for the picture in the buffer descriptor structures 220. The video decoder 209 calculates the PTS based on the DTS and PTS of future reference pictures, and repeat first field parameters, and writes the calculated presentation time to the buffer descriptor structures 220. The computation will now be described.

Referring now to FIG. 3, there is illustrated a graph describing the decoding and presentation times for an exemplary set of pictures, P_(n), . . . I_(m), B_(m+1), B_(m+2), P_(m+3), B_(m+4), B_(m+5), . . . , where the subscripts indicate the decoding order. Picture P_(n) is from a previous sequence that the video decoder 209 did not encounter, and the video decoder 209 locks onto the sequence starting I₀. The display sequence is P_(n), B_(m+1), B_(m+2), I_(m), B_(m+4), B_(m+5), P_(m+3).

It would not be possible to determine the PTS value of picture B_(m+1) from P_(n), because picture P_(n) is from a previous sequence that the video decoder 209 did not encounter. It may be possible to compute the PTS value of picture B_(m+1) from P_(m+3). However, in order to compute the PTS for B_(m+1), information about picture B_(m+2) and P_(m+3) is needed. If the number of B pictures is increased, the number of frames that would need to be examined also increases.

Picture B_(m+1) is predicted from picture I_(m). Because I_(m) is displayed after B_(m+1), I_(m) is the future reference picture for B_(m+1). Therefore, I_(m) and information associated with I_(m) are stored in frame buffers and buffer descriptor structures, during decoding of B_(m+1).

As can be seen, I and P pictures are displayed when the subsequent I or P picture is decoded. Therefore, the difference between the PTS and DTS associated with an I or P picture indicates the total number of displayable fields between the previous I or P picture and the current I or P picture. For example, the difference between the PTS and DTS associated with I_(m) indicates the number of pictures between the previous I or P picture, P_(n), and I_(n). The difference between the PTS and DTS is the time required to display 6 fields. Therefore: PTS for B _(m+1)=DTS of picture I _(m)+2*Time to Display Field

It is preferable to calculate the PTS for a B_(m+1) from the future prediction picture, I_(m), because the future reference picture is normally stored in a frame buffer when decoding a predicted picture. Therefore, no additional memory is required. Additionally, the PTS for B_(m+1) can be determined without information regarding subsequent pictures, B_(m+2) and P_(m+3).

Below is a decision table, indicating the decisions made by the video decoder 209, based on the PTS and DTS of a future reference picture, the repeat first field parameter.

PTS-DTS Presentation I_(m)/P_(m) picture RFF-B_(m+1) Time Picture Sequence 6 fields X DTS + 2 Field P_(n) = F, B_(m+1) = F, B_(m+2) =   (3 frames) time F 7 fields 0 DTS + 2 Field P_(n) = F, B_(m+1) = F, B_(m+2) = (3.5 frames) time TBT 7 fields 1 DTS + 2 Field P_(n) = F, B_(m+1) = TBT, (3.5 frames) time B_(m+2) = F 8 fields 0 DTS + 3 Field P_(n) = TBT, B_(m+1) = F,   (4 frames) time B_(m+2) = TBT 8 fields 1 DTS + 2 Field P_(n) = F, B_(m+1) = TBT,   (4 frames) time B_(m+2) = BTB 9 fields X DTS + 3 Field P_(n) = TBT, B_(m+1) = TBT, (4.5 frames) time B_(m+2) = TBT >9 fields   X — Default: DTS + 2 Field time T = Top Field, B = Bottom Field, F = Frame/(Pair of Fields), X = Don't Care

Referring now to FIG. 4, there is illustrated a flow diagram for determining the presentation time for B-picture, B_(m+1), following an I/P picture, I_(m) or P_(m), in accordance with an embodiment of the present invention. At 405, the video decoder 209 decodes picture I/P_(m), writing the decoded picture to the frame buffers, and parameters associated with the picture to buffer descriptor structures. At 410, the video decoder 209 decodes picture B_(m+1). At 415, the video decoder 209 determines whether picture B_(m+1) includes a PTS. If picture B_(m+1) includes a PTS, the video decoder 209 uses the PTS as the presentation time and writes the PTS to the buffer descriptor structures at 420.

If the picture B_(m+i) does not include a PTS, at 425 the video decoder 209 computes the difference between the PTS and DTS associated with picture I/P_(m). If the difference is 6 or 7 times the display time for a field, at 430 or 435 respectively, the video decoder 209 calculates at 440 or 445, the presentation time as the DTS of I/P_(m)+2 field display times and writes the foregoing for the PTS in the buffer descriptor structures.

If the difference is 8 times the display time for a field, at 450, the video decoder 209 examines the repeat first field parameter for B_(m+1) and determines (455) whether the parameter is 0 or not. If 0, the video decoder 209 calculates at 460 the presentation time as the DTS of I/P_(m)+3 field display times and writes the foregoing for the PTS in the buffer descriptor structures. If 1, the video decoder 209 calculates at 465 the presentation time as the DTS of I/P_(m)+2 field display times and writes the foregoing for the PTS in the buffer descriptor structures.

If the difference is 9 times the display time for a field at 470, the video decoder 209 calculates at 475, the presentation time as the DTS of I/P_(m)+3 field display times and writes the foregoing for the PTS in the buffer descriptor structures.

If the difference is other than 6-9 field display times, the video decoder 209 calculates at 480, the presentation time as the DTS of I/P_(m)+2 field display times and writes the foregoing for the PTS in the buffer descriptor structures.

The embodiments described herein may be implemented as a board level product, as a single chip, application specific integrated circuit (ASIC), or with varying levels of the decoder system integrated with other portions of the system as separate components. The degree of integration of the decoder system will primarily be determined by the speed and cost considerations. Because of the sophisticated nature of modern processor, it is possible to utilize a commercially available processor, which may be implemented external to an ASIC implementation. Alternatively, if the processor is available as an ASIC core or logic block, then the commercially available processor can be implemented as part of an ASIC device wherein certain functions can be implemented in firmware.

While the present invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the present invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the present invention without departing from its scope. Therefore, it is intended that the present invention not be limited to the particular embodiment disclosed, but that the present invention will include all embodiments falling within the scope of the appended claims. 

The invention claimed is:
 1. A system comprising: a buffer configured to store decoded pictures comprising a first picture; a structure configured to indicate a presentation time for the first picture; and a decoder configured to: decode a second picture using the first picture; and determine a presentation time for the second picture using a difference between the presentation time of the first picture and a decode time of the first picture, wherein the first picture and the second picture are different pictures.
 2. The system of claim 1, wherein the first picture is a reference picture for the second picture.
 3. The system of claim 2, wherein the first picture is a future reference picture for the second picture.
 4. The system of claim 1, wherein the first picture is associated with a presentation time stamp indicating the presentation time for the first picture, and a decode time stamp indicating the decode time for the first picture.
 5. The system of claim 1, wherein the decoder is further configured to: prior to determining the presentation time for the second picture, determine whether the second picture has a presentation time stamp; and responsive to the second picture not having a presentation time stamp, determine the presentation time for the second picture using the difference between the presentation time of the first picture and the decode time of the first picture.
 6. The system of claim 1, wherein the presentation time for the second picture is determined further using a repeat first field parameter.
 7. An apparatus comprising: a buffer configured to store decoded pictures comprising a first reference picture; and a decoder configured to: decode a picture using the first reference picture that is a reference picture for the picture; and determine a presentation time for the picture based at least in part on a number of display elements between the first reference picture and a second reference picture in a display sequence.
 8. The apparatus of claim 7, wherein the display elements are displayable fields.
 9. The apparatus of claim 7, wherein the display elements are pictures.
 10. The apparatus of claim 7, wherein the second reference picture is prior to the first reference picture in the display sequence.
 11. The apparatus of claim 7, wherein the display sequence comprises a sequence of pictures in a display order.
 12. The apparatus of claim 7, wherein the decoder is further configured to: prior to determining the presentation time for the picture, determine whether the picture has a presentation time stamp; and responsive to the picture not having a presentation time stamp, determine the presentation time for the picture based at least in part on the number of display elements between the first reference picture and the second reference picture in the display sequence.
 13. The apparatus of claim 7, wherein the presentation time for the picture is determined further using a repeat first field parameter.
 14. A method comprising: storing, in a buffer, decoded pictures comprising a first reference picture; decoding, by a decoder, a picture using the first reference picture that is a reference picture for the picture; and determining a presentation time for the picture based at least in part on a number of display elements between the first reference picture and a second reference picture in a display sequence.
 15. The method of claim 14, wherein the display elements are displayable fields.
 16. The method of claim 14, wherein the display elements are pictures.
 17. The method of claim 14, wherein the second reference picture is prior to the first reference picture in the display sequence.
 18. The method of claim 14, wherein the display sequence comprises a sequence of pictures in a display order.
 19. The method of claim 14, further comprising: prior to determining the presentation time for the picture, determining whether the picture has a presentation time stamp; and responsive to the picture not having a presentation time stamp, determining the presentation time for the picture based at least in part on the number of display elements between the first reference picture and the second reference picture in the display sequence.
 20. The method of claim 14, further comprising: determining the presentation time for the picture further based on a repeat first field parameter. 